package com.fanshuai.tree.trie;

/**
 * 命中关键词
 */
public class WordToken {
    public String word;
    public String pinyin;
    public int start;
    public int end;

    public WordToken(String word, int start, int end) {
        this.word = word;
        this.start = start;
        this.end = end;
    }
    public WordToken() {
        word = null;
        start = -1;
        end = -1;
    }

    @Override
    public String toString() {
        return String.format("[%s, %d->%d]", word, start, end);
    }
}
